a11y: Add proper error reporting to value collection
authorEmmanuele Bassi <ebassi@gnome.org>
Tue, 28 Jul 2020 15:41:44 +0000 (16:41 +0100)
committerEmmanuele Bassi <ebassi@gnome.org>
Tue, 28 Jul 2020 15:49:13 +0000 (16:49 +0100)
commitbf06cad5d9d147fc9b5bc87d8166ead776f947f0
tree952fb7c72a2e8f0012527414e3c9bcf558d221d2
parent2e8de6bd88131209ccd38e1f9dacdc3bb0b0f85b
a11y: Add proper error reporting to value collection

We're currently overloading NULL to mean both "this value is undefined,
and should be reset to its default" and "the value collection failed".
Let's do error reporting right, by using GError to mean "the collection
failed, for this specific reason"; then, we can use a NULL return value
to signal that the accessible attribute should be reset to its default
value.

This is only relevant for pointer-sized attribute values: strings,
references, and reference lists; numeric, boolean, tristate, and token
values either cannot be undefined, or have a specific "undefined" value.
gtk/gtkaccessible.c
gtk/gtkaccessiblevalue.c
gtk/gtkaccessiblevalueprivate.h
gtk/gtktestatcontext.c